<script setup>
	import { onLoad, onShow } from '@dcloudio/uni-app'
	import { http } from '@/utils/http.js'
	import { ref } from 'vue'

	const strings = ref()
	const ruleId = ref(1)
	async function getRules() {
		const res = await http.request({
			url: '/api/index/getDetails',
			method: 'POST',
			data: {
				id: ruleId.value,
			},
		})
		strings.value = res.data.details
	}

	onLoad((option) => {
		ruleId.value = option.id
		getRules()
	})
</script>

<template>
	<view class="agreement-content">
		<rich-text :nodes="strings"></rich-text>
	</view>
</template>

<style></style>